export const getData = () => {
  let tableData = []
  const savedData = localStorage.getItem('lifeEventsData')
  if (savedData) {
    tableData = JSON.parse(savedData)
  } else {
    tableData = [
      {
        year: 2024,
        content: {
          1: {
            data: ['呜呜'],
            type: 'white'
          },
          2: {
            data: ['嘻嘻'],
            type: 'red'
          }
        }
      },
      {
        year: 2023,
        content: {}
      },
      {
        year: 2022,
        content: {}
      },
      {
        year: 2021,
        content: {}
      },
      {
        year: 2020,
        content: {}
      },
      {
        year: 2019,
        content: {}
      },
      {
        year: 2018,
        content: {}
      },
      {
        year: 2017,
        content: {}
      },
      {
        year: 2016,
        content: {}
      },
      {
        year: 2015,
        content: {}
      },
      {
        year: 2014,
        content: {}
      },
      {
        year: 2013,
        content: {}
      },
      {
        year: 2012,
        content: {}
      },
      {
        year: 2011,
        content: {}
      },
      {
        year: 2010,
        content: {}
      },
      {
        year: 2009,
        content: {}
      },
      {
        year: 2008,
        content: {}
      },
      {
        year: 2007,
        content: {}
      },
      {
        year: 2006,
        content: {}
      },
      {
        year: 2005,
        content: {}
      },
      {
        year: 2004,
        content: {}
      },
      {
        year: 2003,
        content: {}
      },
      {
        year: 2002,
        content: {}
      },
      {
        year: 2001,
        content: {}
      },
      {
        year: 2000,
        content: {}
      },
      {
        year: 1999,
        content: {}
      },
      {
        year: 1998,
        content: {}
      },
      {
        year: 1997,
        content: {}
      },
      {
        year: 1996,
        content: {}
      },
      {
        year: 1995,
        content: {}
      },
      {
        year: 1994,
        content: {}
      },
      {
        year: 1993,
        content: {}
      },
      {
        year: 1992,
        content: {
          11: {
            data: ['11日出生'],
            type: 'red'
          }
        }
      }
    ]
  }
  return tableData
}

export const typeData = [
  {
    label: '喜事',
    value: 'red'
  },
  {
    label: '白事',
    value: 'white'
  }
]
